<template>
    <view @tap="__e" class="scope-address space-between data-v-6f060a36" :data-event-opts="[['tap', [['handleSelectAddress', ['$event']]]]]">
        <image class="data-v-6f060a36" src="https://img121.7dun.com/yuanqimali/mybox/addressIcon.png" style="width: 80rpx; height: 80rpx"></image>
        <view class="address-body data-v-6f060a36" v-if="address && address.id">
            <view class="region data-v-6f060a36">
                <text class="tagmr data-v-6f060a36" v-if="address.is_default">默认</text>
                <text class="taggs data-v-6f060a36" v-if="address.tag">{{ address.tag }}</text>
                <text class="data-v-6f060a36">{{ address.province + address.city + address.district }}</text>
            </view>
            <view class="detail data-v-6f060a36">{{ '' + address.address + '' }}</view>
            <view class="name-phone data-v-6f060a36" v-if="isShowPhone">
                <text class="data-v-6f060a36">{{ address.consignee }}</text>
                <text class="data-v-6f060a36">{{ $root.f0 }}</text>
            </view>
        </view>
        <view class="address-body data-v-6f060a36" v-else>
            <view class="no-address data-v-6f060a36" style="font-size: 38rpx; font-weight: bold; letter-spacing: 1px">未添加收货地址</view>
        </view>
        <view class="new-iconfont icon-arrow-right data-v-6f060a36"></view>
    </view>
</template>

<script>
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/SelectAddress/SelectAddress'],
    {
        '09a0': function (e, t, n) {
            'use strict';

            var s = n('9bcc');
            n.n(s).a;
        },
        1376: function (e, t, n) {
            'use strict';

            n.r(t);
            var s = n('2a9e');
            var o = n.n(s);
            for (var d in s) {
                if (['default'].indexOf(d) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return s[e];
                        });
                    })(d);
                }
            }
            t.default = o.a;
        },
        '1a85': function (e, t, n) {
            'use strict';

            n.d(t, 'b', function () {
                return s;
            });
            n.d(t, 'c', function () {
                return o;
            });
            n.d(t, 'a', function () {});
            var s = function () {
                this.$createElement;
                var e = (this._self._c, this.address && this.address.id && this.isShowPhone ? this._f('hidePhoneDetail')(this.address && this.address.phone) : null);
                this.setData(
                    Object.assign(
                        {},
                        {
                            $root: {
                                f0: e
                            }
                        }
                    )
                );
            };
            var o = [];
        },
        '2a9e': function (e, t, n) {
            'use strict';

            (function (e) {
                Object.defineProperty(t, '__esModule', {
                    value: true
                });
                t.default = void 0;
                var n = {
                    props: {
                        value: {
                            type: Object
                        },
                        isShowPhone: {
                            type: Boolean,
                            default: function () {
                                return false;
                            }
                        }
                    },
                    data: function () {
                        return {
                            address: {}
                        };
                    },
                    filters: {
                        hidePhoneDetail: function (e) {
                            return e ? e.substring(0, 3) + '****' + e.substring(7, 11) : '';
                        }
                    },
                    watch: {
                        address: function () {
                            this.$emit('input', this.address);
                        },
                        value: function (e) {
                            this.address = e;
                        }
                    },
                    mounted: function (t) {
                        var that = this;
                        this.address = this.value || {};
                        e.$on('selectAddress', function (e) {
                            that.address = e;
                        });
                    },
                    beforeDestroy: function () {
                        e.$off('selectAddress', function (e) {
                            console.log('移除 selectAddress 自定义事件');
                        });
                    },
                    methods: {
                        handleSelectAddress: function () {
                            e.navigateTo({
                                url: '/pages/myAddress/index?select=true'
                            });
                        }
                    }
                };
                t.default = n;
            }.call(this, n('543d').default));
        },
        '8a38': function (e, t, n) {
            'use strict';

            n.r(t);
            var s = n('1a85');
            var o = n('1376');
            for (var d in o) {
                if (['default'].indexOf(d) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return o[e];
                        });
                    })(d);
                }
            }
            n('09a0');
            var c = n('f0c5');
            var a = Object(c.a)(o.default, s.b, s.c, false, null, '6f060a36', null, false, s.a, void 0);
            t.default = a.exports;
        },
        '9bcc': function (e, t, n) {}
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/SelectAddress/SelectAddress-create-component',
    {
        'components/SelectAddress/SelectAddress-create-component': function (e, t, n) {
            n('543d').createComponent(n('8a38'));
        }
    },
    [['components/SelectAddress/SelectAddress-create-component']]
]);
</script>
<style>
@import './SelectAddress.css';
</style>
